package models

import "gorm.io/gorm"

type SoftwareCategory struct {
	gorm.Model
	Name        string `gorm:"size:100;not null"`
	Slug        string `gorm:"size:100;uniqueIndex"`
	Description string `gorm:"size:255"`
	IsActive    bool   `gorm:"default:true"`
	SEO         SEO    `gorm:"embedded"`
	Softwares   []SoftwareItem
}

type SoftwareItem struct {
	gorm.Model
	Name               string `gorm:"size:100;not null"`
	Slug               string `gorm:"size:100;uniqueIndex"`
	Description        string `gorm:"size:255"`
	DownloadURL        string `gorm:"size:255"`
	IconURL            string `gorm:"size:255"`
	IsActive           bool   `gorm:"default:true"`
	SoftwareCategoryID uint
	SEO                SEO              `gorm:"embedded"`
	Category           SoftwareCategory `gorm:"foreignKey:SoftwareCategoryID"`
}
